package com.hl.card.modular.pack.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hl.card.common.persistence.dao.DisMemberInfoOenMapper;
import com.hl.card.common.persistence.model.DisMemberInfoOen;
import com.hl.card.modular.pack.service.DisMemberInfoOenService;
import com.hl.card.common.util.HttpURLClient;
import com.hl.card.common.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class DisMemberInfoOenServiceImpl extends ServiceImpl<DisMemberInfoOenMapper, DisMemberInfoOen> implements DisMemberInfoOenService{
	@Autowired
	private DisMemberInfoOenMapper disMemberInfoOenMapper;
	
	@Autowired
	private ResponseData responseData;

/*	@Override
	public void selectinfoAndSave() {
		// TODO Auto-generated method stub
		
	}*/
	
	@Value("${dismemberapply.ka_ip}")
	private String ip;  //卡包项目IP
	@Override
	public JSONObject selectinfoAndSave() {
		Map<String,String> paramMap=new HashMap<String, String>();
		/*paramMap.put("userId", userId);
		paramMap.put("userName", userName);
		paramMap.put("loginAccount", loginAccount);*/
		String result=HttpURLClient.post(paramMap, ip+"/api/saCard/infoAndSave");
		 responseData.setData(JSONObject.parse(result));
		 responseData.setMsg("操作成功");
		 responseData.setStatus("1");
		 
		return JSONObject.parseObject(result);
	}
	
}
